import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)
export const constantRoutes = [
  {
    path: '/',
    name: 'index',
    component: () => import('@/views/home/index'),
    meta: {
      keepAlive: false
    }
  },
  {
    path: '/login',
    name:'Login',
    component: () => import('@/views/login/login'),
    meta: {
      keepAlive: false
    }
  },
  {
    path: '/register',
    name:'Register',
    component: () => import('@/views/login/register'),
    meta: {
      keepAlive: false
    }
  },
  {
    path: '/forgetpass',
    name:'Forgetpass',
    component: () => import('@/views/login/forgetpass'),
    meta: {
      keepAlive: false
    }
  },
  {
    path: '/accountcenter',
    name:'Accountcenter',
    component: () => import('@/views/account/accountcenter'),
    meta: {
      keepAlive: false
    }
  },
  {
    path: '/safecenter',
    name:'Safecenter',
    component: () => import('@/views/account/safecenter'),
    meta: {
      keepAlive: false
    }
  },
  {
    path: '/optionforenterprise',
    name:'Optionforenterprise',
    component: () => import('@/views/account/optionforenterprise'),
    meta: {
      keepAlive: false
    }
  },
  {
    path: '/optionforpersonal',
    name:'Optionforpersonal',
    component: () => import('@/views/account/optionforpersonal'),
    meta: {
      keepAlive: false
    }
  },
  {
    path: '/optionchangepass',
    name:'Optionchangepass',
    component: () => import('@/views/account/optionchangepass'),
    meta: {
      keepAlive: false
    }
  },
  {
    path: '/optionchangephone',
    name:'Optionchangephone',
    component: () => import('@/views/account/optionchangephone'),
    meta: {
      keepAlive: false
    }
  },
    {
        path: '/ukeypage',
        name:'Ukeypage',
        component: () => import('@/views/signing/ukeypage'),
        meta: {
            keepAlive: false
        }
    },
    {
        path: '/cloudpage',
        name:'Cloudpage',
        component: () => import('@/views/signing/cloudpage'),
        meta: {
            keepAlive: false
        }
    },
    {
        path: '/ordersign',
        name:'Ordersign',
        component: () => import('@/views/signing/ordersign'),
        meta: {
            keepAlive: false
        }
    },
    {
        path: '/ordercenter',
        name:'Ordercenter',
        component: () => import('@/views/signing/ordercenter'),
        meta: {
            keepAlive: false
        }
    },
    {
        path: '/testcfca',
            name:'Testcfca',
        component: () => import('@/views/others/testcfca'),
        meta: {
        keepAlive: false
    }
    },
]

const createRouter = () =>
    new Router({
      mode: 'hash', // require service support
      base:  '/app/',
      scrollBehavior: () => ({ y: 0 }),
      routes: constantRoutes
    })

export default createRouter()
